jsx3.Class.defineClass("ux.cdb.admin.system.user.UserManageStage", jsx3.lang.Object,
//UserManage.js

  [ux.cdb.admin.AdminStage], 
function(plugin){
  plugin.instance = null;
  
  plugin.getInstance = function(args){
    if (!this.instance) {
      this.instance = new plugin();
    }
    return this.instance;
  }
  
  plugin.prototype.getTabText = function(){
    return 'UserManage';
  }
  
  plugin.prototype.getNamespace = function(){
    return "ux.cdb.admin";
  }

  plugin.prototype.getComponentUIPath = function(){
    return "ux/cdb/admin/system/user/ui/UserManagePage.xml";
  }
  
  plugin.prototype.loadComponent = function(parent){
      var objDate=new Date();
		var me = this;
		setTimeout(function(){
			ux.cdb.admin.CommonCache.loadCache(['INTERNAL_ORG','SYSTEM_USER','CERT_TYPE'], this, function(){
/* @JSC :: begin DEBUG */
				jsx3.log('UserManageStage#loadCommonCache loaded.');
/* @JSC :: end */
				plugin.commonCacheLoaded = true;
			});
		},0);
    ux.megatron.Main.loadUIResourceAsync(parent, this.getNamespace(), this.getComponentUIPath(), this, this.componentLoaded);
  }
  
  plugin.commonCacheLoaded = false;
  plugin.prototype.componentLoaded = function(objEvent){
	// TODO: put code what you want do after below.
    if (objEvent.status == "SUCCESS") {
		var _getCommonCache = function(){
/* @JSC :: begin DEBUG */
			jsx3.log('UserManageStage#_getCommonCache Begin...['+plugin.commonCacheLoaded+']');
/* @JSC :: end */
			if(plugin.commonCacheLoaded === true){
/* @JSC :: begin DEBUG */
				jsx3.log('UserManageStage#componentLoaded _getCommonCache SUCCESS.');
/* @JSC :: end */
				objEvent.obj.setCommonCache();
			}else{
				setTimeout(_getCommonCache,100);
			}
		}
		_getCommonCache();
    }
    else {
      if (objEvent.exception) {
        ux.megatron.Main.logException(objEvent.exception, objEvent.message);
      }
      else {
        jsx3.log(objEvent.message);
      }
    }
  }
});
